/*
 * @Author: wwssaabb
 * @Date: 2021-08-14 16:34:59
 * @LastEditTime: 2021-08-14 16:36:04
 * @FilePath: \ts_demo\demo\extends.ts
 */

type P1<T> = [T] extends ['x'] ? 1 : 2; // 2
type A3 = P1<'x' | 'y'> 

type P2<T> = [T] extends ['x' | 'y'] ? 1 : 2; // 1
type A4 = P2<'x' | 'y'> 
